﻿#ifndef CAMERAFINDER_H
#define CAMERAFINDER_H

#include <QObject>
#include "CameraCommon/CameraLoader.h"

namespace Qly {

/**
 * @brief The CameraFinder class 用于查找相机。这个类会自动加载指定目录下的所有相机 dll。
 *         并从这些 dll 中查找特定名称的相机。
 */
class CAMERA_EXPORT CameraFinder
{
public:
    explicit CameraFinder(QString path, QObject *parent = nullptr);
    ~CameraFinder();
    IndustryCamera * defaultCamera(QSet<CameraType> types, QObject *parent = 0);
    QStringList allCameraName(QSet<Qly::CameraType> types);
    IndustryCamera * findCameraByName(QString rawName, QObject * parent);
    bool release(IndustryCamera * camera);
private:
    QList<CameraLoader *> m_loaders;
};


}


#endif // CAMERAFINDER_H
